﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Casanova.Math;

namespace StudentsAssignment
{
    public class PathNode : IComparable
    {
        public Vector2 pos;
        public List<PathLink> m_links;
	
	    // 
	    public float cost_so_far;
        public float estimated_cost;
        public path_node_category category;
        public bool blocked;
        public bool is_target;
	    // 

        public PathNode()
        {
            m_links = new List<PathLink>();
	    }

        public void AddLink(int link_id)
	    {
            m_links.Add(new PathLink(link_id));
	    }

        public PathNode connection { get; set; }

        #region IComparable Members

        public int CompareTo(object obj)
        {
            return this.estimated_cost.CompareTo(((PathNode)obj).estimated_cost);
        }

        #endregion
    }
}
